<template>
  <div class="vmui-dialog-white-mask">
    <div class="vmui-confirm">
      <h4 class="vmui-confirm-title" v-if="title" v-html="title"></h4>
      <p class="vmui-confirm-content" v-html="message"></p>
      <div class="vmui-confirm-ops">
        <span class="vmui-confirm-button" :class="{'vmui-color-primary': button.color === true, 'vmui-color-disabled': button.disabled}" :style="{color: button.color, width: 100 / buttons.length + '%'}"
              v-for="button in buttons" @click.stop="!button.disabled && closeAlert(button)">
          {{button.text}}
        </span>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      title: String,
      message: String,
      buttons: Array,
      // 关闭弹出框调用
      callback: Function
    }
  }
</script>

<style lang="scss" scoped>
  @import "../style";

  @import "styleMix";
  @include vmui-confirm;
</style>
